<template>
  <div>
    <a-card :bordered="false">
      <f-table ref="table" rowKey="materialPlan200Id" :scroll="{x:2580,y:columns.length*35}" :columns="columns" :exportBtn="false" :multiple="false" :operator="operator" :params="queryParam" :api="api.bmep2" handler="materialPlan200PageListHandler">
      </f-table>
    </a-card>
  </div>
</template>
<script>
  import api from './js/api'
  export default {
    name: 'TableList',
    components: {
    },
    props: {
      // versionId: {
      //   type: String,
      //   default: ''
      // },
      projectId: {
        type: String,
        default: ''
      }
    },
    data() {
      let me = this
      //操作按钮
      let operator = []
      return {
        api:  Object.assign(api, this.api),
        //列表初始化查询参数
        queryParam: {
          projectId: me.projectId
        },
        // 表头
        columns: [
          {
            title: '序号',
            width: 60,
            align: 'center',
            customRender: (text, record, index) => index + 1
          },
          {
            title: '专业代码',
            width: 100,
            align: 'center',
            dataIndex: 'majorCode'
          },
          {
            title: '专业名称',
            width: 100,
            align: 'center',
            dataIndex: 'majorName'
          },
          {
            title: '工程包代码',
            width: 120,
            align: 'center',
            dataIndex: 'packageNo'
          },
          {
            title: '工程包名称',
            width: 120,
            align: 'center',
            dataIndex: 'packageName'
          },
          {
            title: '材料WBS代码',
            width: 100,
            align: 'center',
            dataIndex: 'materialWbsCode'
          },
          {
            title: '全物料代码',
            width: 100,
            align: 'center',
            dataIndex: 'materialCode'
          },
          {
            title: '设备、材料名称',
            width: 150,
            align: 'center',
            dataIndex: 'materialName'
          },
          {
            title: '层级号',
            width: 150,
            align: 'center',
            dataIndex: 'levelNo'
          },
          // {
          //   title: '型号/规格',
          //   width: 200,
          //   align: 'center',
          //   dataIndex: 'materiaSpecs'
          // },
          {
            title: '项目名称',
            width: 200,
            align: 'center',
            dataIndex: 'materiaSpecs'
          },
          {
            title: '材料项目描述',
            width: 200,
            align: 'center',
            dataIndex: 'materialDesc'
          },
          {
            title: '技术参数或技术说明',
            width: 200,
            align: 'center',
            dataIndex: 'technicalData'
          },
          {
            title: '计量单位',
            width: 100,
            align: 'center',
            dataIndex: 'measurementUnit'
          },
          {
            title: '损耗率',
            width: 100,
            align: 'center',
            dataIndex: 'materialUse'
          },
          {
            title: '备注',
            width: 100,
            align: 'center',
            dataIndex: 'remark'
          },
          {
            title: '品牌',
            width: 100,
            align: 'center',
            dataIndex: 'brandName'
          }
        ],
        operator: operator
      }
    },
    created() {
    },
    methods: {
    }
  }
</script>
